<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QChildEvent Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QChildEvent Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QChildEvent class contains event parameters for child object
events. <a href="#details">More...</a></p>

<p>Inherits <a href="qevent.html">QEvent</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qchildevent.html#QChildEvent">__init__</a></b> (<i>self</i>, QEvent.Type&#160;<i>type</i>, QObject&#160;<i>child</i>)</li><li><div class="fn" /><b><a href="qchildevent.html#QChildEvent-2">__init__</a></b> (<i>self</i>, QChildEvent)</li><li><div class="fn" />bool <b><a href="qchildevent.html#added">added</a></b> (<i>self</i>)</li><li><div class="fn" />QObject <b><a href="qchildevent.html#child">child</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchildevent.html#polished">polished</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qchildevent.html#removed">removed</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QChildEvent class contains event parameters for child object
events.</p>
<p>Child events are sent immediately to objects when children are
added or removed.</p>
<p>In both cases you can only rely on the child being a <a href="qobject.html">QObject</a> (or, if <a href="qobject.html#isWidgetType">QObject.isWidgetType</a>() returns
true, a <a href="qwidget.html">QWidget</a>). This is because in the
<a href="qevent.html#Type-enum">QEvent.ChildAdded</a> case the
child is not yet fully constructed; in the <a href="qevent.html#Type-enum">QEvent.ChildRemoved</a> case it might have
already been destructed.</p>
<p>The handler for these events is <a href="qobject.html#childEvent">QObject.childEvent</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QChildEvent" />QChildEvent.__init__ (<i>self</i>, <a href="qevent.html#Type-enum">QEvent.Type</a>&#160;<i>type</i>, <a href="qobject.html">QObject</a>&#160;<i>child</i>)</h3><p>Constructs a child event object of a particular <i>type</i> for
the <i>child</i>.</p>
<p><i>type</i> can be <a href="qevent.html#Type-enum">QEvent.ChildAdded</a>, <a href="qevent.html#Type-enum">QEvent.ChildRemoved</a>, <a href="qevent.html#Type-enum">QEvent.ChildPolished</a>, or <a href="qevent.html#Type-enum">QEvent.ChildRemoved</a>.</p>
<p><b>See also</b> <a href="qchildevent.html#child">child</a>().</p>


<h3 class="fn"><a name="QChildEvent-2" />QChildEvent.__init__ (<i>self</i>, <a href="qchildevent.html">QChildEvent</a>)</h3><h3 class="fn"><a name="added" />bool QChildEvent.added (<i>self</i>)</h3><p>Returns true if <a href="qevent.html#type">type</a>() is
<a href="qevent.html#Type-enum">QEvent.ChildAdded</a>; otherwise
returns false.</p>


<h3 class="fn"><a name="child" /><a href="qobject.html">QObject</a> QChildEvent.child (<i>self</i>)</h3><p>Returns the child object that was added or removed.</p>


<h3 class="fn"><a name="polished" />bool QChildEvent.polished (<i>self</i>)</h3><p>Returns true if <a href="qevent.html#type">type</a>() is
<a href="qevent.html#Type-enum">QEvent.ChildPolished</a>;
otherwise returns false.</p>


<h3 class="fn"><a name="removed" />bool QChildEvent.removed (<i>self</i>)</h3><p>Returns true if <a href="qevent.html#type">type</a>() is
<a href="qevent.html#Type-enum">QEvent.ChildRemoved</a>; otherwise
returns false.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2011</td><td align="right" width="25%">Qt&#160;4.8.0</td></tr></table></div></address></body></html>